﻿@{
    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "注册确认页";

    string message = "";
    var confirmationToken = Request["confirmationCode"];

    WebSecurity.Logout();
    if (!confirmationToken.IsEmpty()) {
        if (WebSecurity.ConfirmAccount(confirmationToken)) {
            message = "已确认注册! 单击登录选项卡即可登录该网站。";
        } else {
            message = "未能确认你的注册信息。";
        }
    }
}

<hgroup class="title">
    <h1>@Page.Title.</h1>
    <h2>使用以下表单确认你的帐户。</h2>
</hgroup>

@if (!message.IsEmpty()) {
    <p>@message</p>
} else {
    <form method="post">
        <fieldset>
            <legend>确认代码</legend>
            <ol>
                <li>
                    <label for="confirmationCode">确认代码</label>
                    <input type="text" id="confirmationCode" name="confirmationCode" />
                </li>
            </ol>
            <input type="submit" value="确认" />
        </fieldset>
    </form>
}